/*
 * HelpCenterActivity.java
 * business
 *
 * Created by SunDing on 2016/9/9.
 *
 * Copyright (c) 2016年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.ui.service.helpcenter;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

import com.yidiandao.business.R;
import com.yidiandao.business.base.BaseActivity;
import com.yidiandao.business.utils.ActivityUtils;

/** 帮助中心 */
public class HelpCenterActivity extends BaseActivity {

    private HelpCenterFragment mHelpCenterFragment;

    public static void actionStart(Activity activity) {
        Intent intent = new Intent(activity, HelpCenterActivity.class);
        activity.startActivity(intent);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_help_center);
    }

    @Override
    protected void initFragment() {
        mHelpCenterFragment =
                (HelpCenterFragment)
                        getSupportFragmentManager().findFragmentById(R.id.container_help_center);
        if (mHelpCenterFragment == null) {
            mHelpCenterFragment = HelpCenterFragment.getInstance();
            ActivityUtils.addFragmentToActivity(
                    getSupportFragmentManager(), mHelpCenterFragment, R.id.container_help_center);
        }
    }

    @Override
    protected void initPresenter() {
        new HelpCenterPresenter(mHelpCenterFragment);
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_help_center;
    }
}
